package com.cskaoyan.javase.oop2._1extend._6initialization._2question;

/**
 * @description: 为什么要直接提供无参构造?
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

/**
 * 子类的隐式初始化要使用父类的无参构造,如果没有子类就会报错!
 * 除此之外,有些框架创建对象可能依赖无参构造,建议加上无参构造
 *
 */
public class Demo2 {
}
class A{
    int a;

    public A(int a) {
        this.a = a;
    }

    public A() {
    }
}
//There is no default constructor available in 'com.cskaoyan.javase.oop2._1extend._6initialization._2question.A'
class B extends A{

}